package logic.hashfunctions;

public class HashFunction2 extends AbstractHashFuncion {

	@Override
	public Integer generateHash(String word) {

		int mod = 65535;
		int hash = 0;
		for (int i = 0; i < word.length(); ++i) {

			hash += Character.codePointAt(word, i); // word[i];
			hash %= mod;
		}

		return hash;

	}

}
